Optimal. Leaf size=310 \[ -\frac{a \left (-a^2 b^2 (190 A+121 C)+4 a^4 C-32 b^4 (5 A+4 C)\right ) \tan (c+d x)}{60 b d}+\frac{\left (12 a^2 b^2 (4 A+3 C)+8 a^4 (2 A+C)+b^4 (6 A+5 C)\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}-\frac{\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) \tan (c+d x) (a+b \sec (c+d x))^3}{120 b d}+\frac{a \left (-4 a^2 C+70 A b^2+53 b^2 C\right ) \tan (c+d x) (a+b \sec (c+d x))^2}{120 b d}-\frac{\left (-2 a^2 b^2 (130 A+89 C)+8 a^4 C-15 b^4 (6 A+5 C)\right ) \tan (c+d x) \sec (c+d x)}{240 d}+\frac{C \tan (c+d x) (a+b \sec (c+d x))^5}{6 b d}-\frac{a C \tan (c+d x) (a+b \sec (c+d x))^4}{30 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.704779, antiderivative size = 310, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.226, Rules used = {4083, 4002, 3997, 3787, 3770, 3767, 8} \[ -\frac{a \left (-a^2 b^2 (190 A+121 C)+4 a^4 C-32 b^4 (5 A+4 C)\right ) \tan (c+d x)}{60 b d}+\frac{\left (12 a^2 b^2 (4 A+3 C)+8 a^4 (2 A+C)+b^4 (6 A+5 C)\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}-\frac{\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) \tan (c+d x) (a+b \sec (c+d x))^3}{120 b d}+\frac{a \left (-4 a^2 C+70 A b^2+53 b^2 C\right ) \tan (c+d x) (a+b \sec (c+d x))^2}{120 b d}-\frac{\left (-2 a^2 b^2 (130 A+89 C)+8 a^4 C-15 b^4 (6 A+5 C)\right ) \tan (c+d x) \sec (c+d x)}{240 d}+\frac{C \tan (c+d x) (a+b \sec (c+d x))^5}{6 b d}-\frac{a C \tan (c+d x) (a+b \sec (c+d x))^4}{30 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4083
Rule 4002
Rule 3997
Rule 3787
Rule 3770
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int \sec (c+d x) (a+b \sec (c+d x))^4 \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac{C (a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac{\int \sec (c+d x) (a+b \sec (c+d x))^4 (b (6 A+5 C)-a C \sec (c+d x)) \, dx}{6 b}\\ &=-\frac{a C (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac{C (a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac{\int \sec (c+d x) (a+b \sec (c+d x))^3 \left (3 a b (10 A+7 C)-\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) \sec (c+d x)\right ) \, dx}{30 b}\\ &=-\frac{\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac{a C (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac{C (a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac{\int \sec (c+d x) (a+b \sec (c+d x))^2 \left (3 b \left (8 a^2 (5 A+3 C)+5 b^2 (6 A+5 C)\right )+3 a \left (70 A b^2-4 a^2 C+53 b^2 C\right ) \sec (c+d x)\right ) \, dx}{120 b}\\ &=\frac{a \left (70 A b^2-4 a^2 C+53 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b d}-\frac{\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac{a C (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac{C (a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac{\int \sec (c+d x) (a+b \sec (c+d x)) \left (3 a b \left (8 a^2 (15 A+8 C)+b^2 (230 A+181 C)\right )-3 \left (8 a^4 C-15 b^4 (6 A+5 C)-2 a^2 b^2 (130 A+89 C)\right ) \sec (c+d x)\right ) \, dx}{360 b}\\ &=-\frac{\left (8 a^4 C-15 b^4 (6 A+5 C)-2 a^2 b^2 (130 A+89 C)\right ) \sec (c+d x) \tan (c+d x)}{240 d}+\frac{a \left (70 A b^2-4 a^2 C+53 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b d}-\frac{\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac{a C (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac{C (a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac{\int \sec (c+d x) \left (45 b \left (8 a^4 (2 A+C)+12 a^2 b^2 (4 A+3 C)+b^4 (6 A+5 C)\right )-12 a \left (4 a^4 C-32 b^4 (5 A+4 C)-a^2 b^2 (190 A+121 C)\right ) \sec (c+d x)\right ) \, dx}{720 b}\\ &=-\frac{\left (8 a^4 C-15 b^4 (6 A+5 C)-2 a^2 b^2 (130 A+89 C)\right ) \sec (c+d x) \tan (c+d x)}{240 d}+\frac{a \left (70 A b^2-4 a^2 C+53 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b d}-\frac{\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac{a C (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac{C (a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac{1}{16} \left (8 a^4 (2 A+C)+12 a^2 b^2 (4 A+3 C)+b^4 (6 A+5 C)\right ) \int \sec (c+d x) \, dx-\frac{\left (a \left (4 a^4 C-32 b^4 (5 A+4 C)-a^2 b^2 (190 A+121 C)\right )\right ) \int \sec ^2(c+d x) \, dx}{60 b}\\ &=\frac{\left (8 a^4 (2 A+C)+12 a^2 b^2 (4 A+3 C)+b^4 (6 A+5 C)\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}-\frac{\left (8 a^4 C-15 b^4 (6 A+5 C)-2 a^2 b^2 (130 A+89 C)\right ) \sec (c+d x) \tan (c+d x)}{240 d}+\frac{a \left (70 A b^2-4 a^2 C+53 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b d}-\frac{\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac{a C (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac{C (a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac{\left (a \left (4 a^4 C-32 b^4 (5 A+4 C)-a^2 b^2 (190 A+121 C)\right )\right ) \operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{60 b d}\\ &=\frac{\left (8 a^4 (2 A+C)+12 a^2 b^2 (4 A+3 C)+b^4 (6 A+5 C)\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}-\frac{a \left (4 a^4 C-32 b^4 (5 A+4 C)-a^2 b^2 (190 A+121 C)\right ) \tan (c+d x)}{60 b d}-\frac{\left (8 a^4 C-15 b^4 (6 A+5 C)-2 a^2 b^2 (130 A+89 C)\right ) \sec (c+d x) \tan (c+d x)}{240 d}+\frac{a \left (70 A b^2-4 a^2 C+53 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b d}-\frac{\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac{a C (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac{C (a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}\\ \end{align*}
Mathematica [A] time = 2.90493, size = 460, normalized size = 1.48 \[ -\frac{\sec ^6(c+d x) \left (A \cos ^2(c+d x)+C\right ) \left (240 \left (12 a^2 b^2 (4 A+3 C)+8 a^4 (2 A+C)+b^4 (6 A+5 C)\right ) \cos ^6(c+d x) \left (\log \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )\right )-2 \sin (c+d x) \left (64 a b \left (a^2 (75 A+80 C)+8 b^2 (10 A+11 C)\right ) \cos (c+d x)+20 \left (36 a^2 b^2 (4 A+5 C)+24 a^4 C+5 b^4 (6 A+5 C)\right ) \cos (2 (c+d x))+720 a^2 A b^2 \cos (4 (c+d x))+2160 a^2 A b^2+2400 a^3 A b \cos (3 (c+d x))+480 a^3 A b \cos (5 (c+d x))+540 a^2 b^2 C \cos (4 (c+d x))+3060 a^2 b^2 C+2240 a^3 b C \cos (3 (c+d x))+320 a^3 b C \cos (5 (c+d x))+120 a^4 C \cos (4 (c+d x))+360 a^4 C+2240 a A b^3 \cos (3 (c+d x))+320 a A b^3 \cos (5 (c+d x))+1792 a b^3 C \cos (3 (c+d x))+256 a b^3 C \cos (5 (c+d x))+90 A b^4 \cos (4 (c+d x))+510 A b^4+75 b^4 C \cos (4 (c+d x))+745 b^4 C\right )\right )}{1920 d (A \cos (2 (c+d x))+A+2 C)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.059, size = 511, normalized size = 1.7 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.02264, size = 620, normalized size = 2. \begin{align*} \frac{640 \,{\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a^{3} b + 640 \,{\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a b^{3} + 128 \,{\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} C a b^{3} - 5 \, C b^{4}{\left (\frac{2 \,{\left (15 \, \sin \left (d x + c\right )^{5} - 40 \, \sin \left (d x + c\right )^{3} + 33 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 180 \, C a^{2} b^{2}{\left (\frac{2 \,{\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 30 \, A b^{4}{\left (\frac{2 \,{\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 120 \, C a^{4}{\left (\frac{2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 720 \, A a^{2} b^{2}{\left (\frac{2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 480 \, A a^{4} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 1920 \, A a^{3} b \tan \left (d x + c\right )}{480 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.592328, size = 716, normalized size = 2.31 \begin{align*} \frac{15 \,{\left (8 \,{\left (2 \, A + C\right )} a^{4} + 12 \,{\left (4 \, A + 3 \, C\right )} a^{2} b^{2} +{\left (6 \, A + 5 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{6} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \,{\left (8 \,{\left (2 \, A + C\right )} a^{4} + 12 \,{\left (4 \, A + 3 \, C\right )} a^{2} b^{2} +{\left (6 \, A + 5 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{6} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \,{\left (192 \, C a b^{3} \cos \left (d x + c\right ) + 64 \,{\left (5 \,{\left (3 \, A + 2 \, C\right )} a^{3} b + 2 \,{\left (5 \, A + 4 \, C\right )} a b^{3}\right )} \cos \left (d x + c\right )^{5} + 40 \, C b^{4} + 15 \,{\left (8 \, C a^{4} + 12 \,{\left (4 \, A + 3 \, C\right )} a^{2} b^{2} +{\left (6 \, A + 5 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{4} + 64 \,{\left (5 \, C a^{3} b +{\left (5 \, A + 4 \, C\right )} a b^{3}\right )} \cos \left (d x + c\right )^{3} + 10 \,{\left (36 \, C a^{2} b^{2} +{\left (6 \, A + 5 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{480 \, d \cos \left (d x + c\right )^{6}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \left (a + b \sec{\left (c + d x \right )}\right )^{4} \sec{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.23601, size = 1485, normalized size = 4.79 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]